<?php


namespace Xiaoguai\DesignPattern\DP004\Adapter;


use Xiaoguai\DesignPattern\DP004\Target;
use Xiaoguai\DesignPattern\Main\Base\CacheDriver\RedisCache;

class RedisAdapter extends RedisCache implements Target
{
    public function get(string $key)
    {
        $json = [
            'unique_id' => uniqid(),
            'key' => $key,
            'data' => parent::get($key),
        ];
        return json_encode($json);
    }
}